package cn.edu.just.firstjavaapp.l3;

public class ArrayDemo {
    public static void main(String[] args) {
        int[]  a ;  //引用
        a = new int[5];
        a[0]=100;
        a[1]= 20;

        System.out.println(a[0]);
//        System.out.println(a[9]);
//        System.out.println(a[10]);
        System.out.println(a.length);

        for(int i=0;i<a.length;i++){
            a[i] = 2*(i)+1;
        }
        for(int i=0;i<a.length;i++){
            System.out.print(a[i]+" ");
        }
        System.out.println("-------");
        int[] b = {3,5,7,9};
        int[] c={};
        System.out.println(c.length);

        int[] d = new int[0];
    }
}
